#ifndef BLOWINGWIDGET_H
#define BLOWINGWIDGET_H

#include "CommonContainer.h"
#include <QLabel>
#include <QVBoxLayout>
#include <QWidget>

class BlowingItem : public QFrame
{
    Q_OBJECT

public:
    explicit BlowingItem(const QString &title, const QString &value, QWidget *parent = nullptr);
    ~BlowingItem();

    void setValue(const QString &value);
    QString getValue() const;

private:
    void setupUI();

    QString m_title;
    QString m_value;
    QLabel *m_valueLabel;
};

class BlowingWidget : public CommonContainer
{
    Q_OBJECT

public:
    explicit BlowingWidget(const QString &title, QWidget *parent = nullptr);
    ~BlowingWidget();

    void setCurrentBlowingTime(const QString &time);
    
    void setEstimatedRemainingTime(const QString &time);
    
    void setCurrentTemperature(const QString &temperature);
    
    void setCurrentCarbonContent(const QString &content);
    
    void setOperatingMode(const QString &mode);

private:
    void setupUI();
    void setupConnections();

    QVBoxLayout *m_contentLayout;

    BlowingItem *m_currentTimeItem;
    BlowingItem *m_remainingTimeItem;
    BlowingItem *m_temperatureItem;
    BlowingItem *m_carbonContentItem;
    BlowingItem *m_operatingModeItem;
};

#endif // BLOWINGWIDGET_H
